package org.iqiyi.entity;

import lombok.Data;
import org.springframework.security.core.userdetails.UserDetails;

import java.io.Serializable;
import java.util.List;

@Data
public class Auth implements UserDetails, Serializable {
    private String id;
    private String username;
    private String password;
    private String handeUrl;
    private List<AuthRole> authorities;

    private String accessToken;
    private String tokenType;
    private String refreshToken;
    private String jti;
    private int expiresIn;

    @Override
    public boolean isAccountNonExpired() {
        return true;
    }

    @Override
    public boolean isAccountNonLocked() {
        return true;
    }

    @Override
    public boolean isCredentialsNonExpired() {
        return true;
    }

    @Override
    public boolean isEnabled() {
        return true;
    }
}
